const { envVersion } = wx.getAccountInfoSync().miniProgram

const envVersionUrl = {
  develop: `http://123.57.156.130:8080`,
  trial: `http://123.57.156.130:8080`,
  release: `http://123.57.156.130:8080`
}
const envVersionAtlasUrl = {
  develop: `http://123.57.156.130:8080`,
  trial: `http://123.57.156.130:8080`,
  release: `http://123.57.156.130:8080`
}
const baseUrl = () => {
  return envVersionUrl[envVersion]
}
const atlasUrl = () => {
  return envVersionAtlasUrl[envVersion]
}

const imageurl = {
  develop: `/assets`,
  trial: `https://tp.qyxqk.com`,
  release: `https://tp.qyxqk.com`
}
const getImageUrl = imageurl[envVersion]

const urlEnv = {
  develop: `${getImageUrl}/images/`,
  trial: `${getImageUrl}/`,
  release: `${getImageUrl}/`
}
const getImgUrl = url => {
  return `${urlEnv[envVersion]}${url}`
}

export { baseUrl, atlasUrl, getImgUrl }
